package jpa.entitys.promis.common;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the COST_ARTICLE_SUB_GROUP database table.
 * 
 */
@Embeddable
public class CostArticleSubGroupPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="ARTICLE_GROUP", unique=true, nullable=false, length=30)
	private String articleGroup;

	@Column(name="ARTICLE_SUB_GROUP", unique=true, nullable=false, length=30)
	private String articleSubGroup;

    public CostArticleSubGroupPK() {
    }
	public String getArticleGroup() {
		return this.articleGroup;
	}
	public void setArticleGroup(String articleGroup) {
		this.articleGroup = articleGroup;
	}
	public String getArticleSubGroup() {
		return this.articleSubGroup;
	}
	public void setArticleSubGroup(String articleSubGroup) {
		this.articleSubGroup = articleSubGroup;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof CostArticleSubGroupPK)) {
			return false;
		}
		CostArticleSubGroupPK castOther = (CostArticleSubGroupPK)other;
		return 
			this.articleGroup.equals(castOther.articleGroup)
			&& this.articleSubGroup.equals(castOther.articleSubGroup);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.articleGroup.hashCode();
		hash = hash * prime + this.articleSubGroup.hashCode();
		
		return hash;
    }
}